package com.linghu.controller;

import com.linghu.pojo.ResponseBody;
import com.linghu.service.Assistant;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

@RestController
public class ToolsController {
    @Resource
    private Assistant assistant;

    @GetMapping("/chat1")
    public ResponseBody chat1() {
        return assistant.chat("帮我获取后面网址的内容：https://docs.langchain4j.dev/intro");
    }

    @GetMapping("/chat2")
    public ResponseBody chat2() {
        return assistant.chat("帮我获取后面网址的内容：https://jsonplaceholder.typicode.com/posts/1");
    }
}
